﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_ChiPhiMuaHang : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvAccount1")]
        private ADVAccount _AdvAccount1;
        [AccessedThroughProperty("AdvAccount2")]
        private ADVAccount _AdvAccount2;
        [AccessedThroughProperty("AdvNhaCungCap")]
        private ADVObjects _AdvNhaCungCap;
        [AccessedThroughProperty("AdvObjects1")]
        private ADVObjects _AdvObjects1;
        [AccessedThroughProperty("AdvTKThanhToan")]
        private ADVAccount _AdvTKThanhToan;
        [AccessedThroughProperty("AdvTKThue")]
        private ADVAccount _AdvTKThue;
        [AccessedThroughProperty("Button1")]
        private Button _Button1;
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTab2")]
        private C1DockingTab _C1DockingTab2;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("C1NumericEdit1")]
        private C1NumericEdit _C1NumericEdit1;
        [AccessedThroughProperty("C1NumericEdit2")]
        private C1NumericEdit _C1NumericEdit2;
        [AccessedThroughProperty("C1NumericEdit3")]
        private C1NumericEdit _C1NumericEdit3;
        [AccessedThroughProperty("C1NumericEdit4")]
        private C1NumericEdit _C1NumericEdit4;
        [AccessedThroughProperty("C1NumericEdit5")]
        private C1NumericEdit _C1NumericEdit5;
        [AccessedThroughProperty("C1NumericEdit6")]
        private C1NumericEdit _C1NumericEdit6;
        [AccessedThroughProperty("CboKhaiThue")]
        private ComboBox _CboKhaiThue;
        [AccessedThroughProperty("CboLoaiChiPhi")]
        private ComboBox _CboLoaiChiPhi;
        [AccessedThroughProperty("CboLoaiDuLieu")]
        private ComboBox _CboLoaiDuLieu;
        [AccessedThroughProperty("CboLoaiHoaDon")]
        private ComboBox _CboLoaiHoaDon;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CboPhanBo")]
        private ComboBox _CboPhanBo;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdChuyen")]
        private Button _CmdChuyen;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdSearchHangHoa")]
        private Button _CmdSearchHangHoa;
        [AccessedThroughProperty("CmdTimNhapKhau")]
        private ToolStripMenuItem _CmdTimNhapKhau;
        [AccessedThroughProperty("CmdTimNhapKho")]
        private ToolStripMenuItem _CmdTimNhapKho;
        [AccessedThroughProperty("CmdTimPhieuNhap")]
        private ContextMenuStrip _CmdTimPhieuNhap;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("ComboBox1")]
        private ComboBox _ComboBox1;
        [AccessedThroughProperty("ComboBox2")]
        private ComboBox _ComboBox2;
        [AccessedThroughProperty("ComboBox3")]
        private ComboBox _ComboBox3;
        [AccessedThroughProperty("ComboBox4")]
        private ComboBox _ComboBox4;
        [AccessedThroughProperty("DateTimePicker1")]
        private DateTimePicker _DateTimePicker1;
        [AccessedThroughProperty("DateTimePicker2")]
        private DateTimePicker _DateTimePicker2;
        [AccessedThroughProperty("ImageList1")]
        private ImageList _ImageList1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label12")]
        private Label _Label12;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label14")]
        private Label _Label14;
        [AccessedThroughProperty("Label15")]
        private Label _Label15;
        [AccessedThroughProperty("Label16")]
        private Label _Label16;
        [AccessedThroughProperty("Label17")]
        private Label _Label17;
        [AccessedThroughProperty("Label18")]
        private Label _Label18;
        [AccessedThroughProperty("Label19")]
        private Label _Label19;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label20")]
        private Label _Label20;
        [AccessedThroughProperty("Label21")]
        private Label _Label21;
        [AccessedThroughProperty("Label22")]
        private Label _Label22;
        [AccessedThroughProperty("Label23")]
        private Label _Label23;
        [AccessedThroughProperty("Label24")]
        private Label _Label24;
        [AccessedThroughProperty("Label25")]
        private Label _Label25;
        [AccessedThroughProperty("Label26")]
        private Label _Label26;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label42")]
        private Label _Label42;
        [AccessedThroughProperty("Label47")]
        private Label _Label47;
        [AccessedThroughProperty("Label48")]
        private Label _Label48;
        [AccessedThroughProperty("Label49")]
        private Label _Label49;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label50")]
        private Label _Label50;
        [AccessedThroughProperty("Label51")]
        private Label _Label51;
        [AccessedThroughProperty("Label52")]
        private Label _Label52;
        [AccessedThroughProperty("Label53")]
        private Label _Label53;
        [AccessedThroughProperty("Label54")]
        private Label _Label54;
        [AccessedThroughProperty("Label55")]
        private Label _Label55;
        [AccessedThroughProperty("Label56")]
        private Label _Label56;
        [AccessedThroughProperty("Label57")]
        private Label _Label57;
        [AccessedThroughProperty("Label59")]
        private Label _Label59;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label60")]
        private Label _Label60;
        [AccessedThroughProperty("Label63")]
        private Label _Label63;
        [AccessedThroughProperty("Label64")]
        private Label _Label64;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("PNDungChung")]
        private Panel _PNDungChung;
        [AccessedThroughProperty("TextBox1")]
        private TextBox _TextBox1;
        [AccessedThroughProperty("TextBox2")]
        private TextBox _TextBox2;
        [AccessedThroughProperty("TextBox3")]
        private TextBox _TextBox3;
        [AccessedThroughProperty("TextBox4")]
        private TextBox _TextBox4;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton2")]
        private ToolStripButton _ToolStripButton2;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("TxtDienGiaiPhi")]
        private TextBox _TxtDienGiaiPhi;
        [AccessedThroughProperty("txtMST")]
        private TextBox _txtMST;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        [AccessedThroughProperty("TxtNgayCT")]
        private DateTimePicker _TxtNgayCT;
        [AccessedThroughProperty("TxtNgayHoaDon")]
        private DateTimePicker _TxtNgayHoaDon;
        [AccessedThroughProperty("TxtSoChungTu")]
        private TextBox _TxtSoChungTu;
        [AccessedThroughProperty("TxtSoCT")]
        private TextBox _TxtSoCT;
        [AccessedThroughProperty("TxtSoHoaDon")]
        private TextBox _TxtSoHoaDon;
        [AccessedThroughProperty("TxtSoSeri")]
        private TextBox _TxtSoSeri;
        [AccessedThroughProperty("TxtThueSuat")]
        private C1NumericEdit _TxtThueSuat;
        [AccessedThroughProperty("TxtTienPhi")]
        private C1NumericEdit _TxtTienPhi;
        [AccessedThroughProperty("TxtTienPhiNT")]
        private C1NumericEdit _TxtTienPhiNT;
        [AccessedThroughProperty("TxtTienThuePhi")]
        private C1NumericEdit _TxtTienThuePhi;
        [AccessedThroughProperty("TxtTienThuePhiNT")]
        private C1NumericEdit _TxtTienThuePhiNT;
        [AccessedThroughProperty("TxtTyGia")]
        private C1NumericEdit _TxtTyGia;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        public string cFrmFormat;
        public string cFrmKhoa;
        private string cFrmKhoaOld;
        public string cFrmKhoaPhieuNhap;
        private string cFrmTask;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnabledControl;
        private string mLoaiChungTu;
        private clsChiPhiMuaHang objCP;
        private clsChiPhiMuaHangChiTiet objCPCT;
        private clsNhapKho objNK;
        private clsNhapKhoChiTiet objNKCT;
        private clsSoChungTu objSoCT;
        private FA_GhiTangGiamTaiSan objTSCD;

        public Frm_ChiPhiMuaHang()
        {
            base.Load += new EventHandler(this.Frm_ChiPhiMuaHang_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.mLoaiChungTu = "CPMH";
            this.objSoCT = new clsSoChungTu();
            this.cFrmKhoaPhieuNhap = "";
            this.cFrmKhoa = "";
            this.cFrmKhoaOld = "";
            this.cFrmTask = "";
            this.objNK = new clsNhapKho();
            this.objNKCT = new clsNhapKhoChiTiet();
            this.objCP = new clsChiPhiMuaHang();
            this.objCPCT = new clsChiPhiMuaHangChiTiet();
            this.objTSCD = new FA_GhiTangGiamTaiSan();
            this.InitializeComponent();
        }

        private void AdvNhaCungCap_ValueChanged(object sender, EventArgs e)
        {
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            tuong.Load(this.AdvNhaCungCap.Value);
            this.txtMST.Text = tuong.MaSoThue;
        }

        private void CboLoaiHoaDon_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiHoaDon.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                clsDMLoaiHoaDon don = new clsDMLoaiHoaDon();
                don.Load(this.CboLoaiHoaDon.SelectedValue.ToString());
                this.TxtThueSuat.Value = don.TyLeThue;
            }
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                this.TxtTyGia.Value = 0;
            }
            else
            {
                string strCode = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (strCode != "")
                {
                    clsDMLoaiTien tien = new clsDMLoaiTien();
                    tien.LoadByCode(strCode);
                    if (tien.SoLe > 0)
                    {
                        this.cFrmFormat = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("##########", tien.SoLe);
                    }
                    if (tien.TienViet == 1)
                    {
                        this.TxtTyGia.Enabled = false;
                    }
                    this.TxtTyGia.Value = tien.TyGia;
                    this.FormatNumber();
                }
            }
        }

        private void CboNguyenTePhiNK_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                this.TxtTyGia.Value = 0;
            }
            else
            {
                string strCode = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (strCode != "")
                {
                    clsDMLoaiTien tien = new clsDMLoaiTien();
                    tien.LoadByCode(strCode);
                    this.TxtTyGia.Value = tien.TyGia;
                }
            }
        }

        private void CboPhanBo_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.PhanBoChiPhi();
        }

        public bool CheckGrid()
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn chưa nhập h\x00e0ng h\x00f3a nhập kho!", ""));
                    this.VSlist.Focus();
                    this.VSlist.Select(i, 4);
                    return false;
                }
                if ((Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 13]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 15]), 0, modGeneral.TypeOfValue.Nothing))) == 0.0)
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Bạn chưa nhập số lượng hoặc trị gi\x00e1 h\x00e0ng nhập kho!", ""));
                    this.VSlist.Focus();
                    this.VSlist.Select(i, 13);
                    return false;
                }
            }
            return true;
        }

        public bool CheckIvalid()
        {
            clsDMTaiKhoan khoan = new clsDMTaiKhoan();
            khoan.Load(this.AdvTKThanhToan.Value);
            if ((khoan.CongNo == 1) && (LVYModule.ReturnIfNull(this.AdvNhaCungCap.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == ""))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập nh\x00e0 cung cấp!", ""));
                this.AdvNhaCungCap.Focus();
                return false;
            }
            if (this.objCP.TrungSoChungTu(this.TxtSoChungTu.Text.Trim(), this.cFrmKhoa))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Số chứng từ n\x00e0y đ\x00e3 tồn tại, bạn phải nhập số chứng từ kh\x00e1c!", ""));
                this.TxtSoChungTu.Focus();
                return false;
            }
            if (this.AdvTKThanhToan.Value.Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản c\x00f3!", ""));
                this.AdvTKThanhToan.Focus();
                return false;
            }
            if (Conversions.ToBoolean(Microsoft.VisualBasic.CompilerServices.Operators.AndObject(Microsoft.VisualBasic.CompilerServices.Operators.CompareObjectNotEqual(this.TxtTienThuePhiNT.Value, 0, false), this.AdvTKThue.Value.Trim() == "")))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập t\x00e0i khoản thuế!", ""));
                this.AdvTKThue.Focus();
                return false;
            }
            if (!this.CheckGrid())
            {
                return false;
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
            }
            this.EmptyData();
            this.objSoCT.Load(this.mLoaiChungTu);
            this.TxtNgayCT.Text = this.TxtNgayChungTu.Text;
            this.TxtSoCT.Text = this.objSoCT.CreateVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayCT.Text), 6), 1);
            this.cFrmKhoa = modGeneral.CreatKey("ST_ChiPhiNhapKho", 15, "CP");
            this.CboLoaiTien.SelectedValue = modGeneral.H_CURRENCY;
            this.CboLoaiTien.SelectedValue = "NB";
            this.EnabledControl = true;
            this.cFrmTask = "I";
            this.CboKhaiThue.SelectedIndex = 0;
        }

        private void CmdDel_Click(object sender, EventArgs e)
        {
            if ((!Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing), "", false) && LVYModule.ConfirmDelete("")) && this.objCP.DeleteData(this.cFrmKhoa))
            {
                this.EmptyData();
            }
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
                this.cFrmTask = "U";
                this.EnabledControl = true;
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdFind_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_ChiPhiMuaHangList.Show();
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            if (this.CheckIvalid())
            {
                if (!this.SaveDetails())
                {
                    this.objCP.ClearTemp(this.cFrmKhoa);
                }
                else if (!this.UpDateData())
                {
                    this.objCP.ClearTemp(this.cFrmKhoa);
                }
                else
                {
                    this.objCP.ClearTemp(this.cFrmKhoa);
                    this.cFrmTask = "";
                    this.EnabledControl = false;
                }
            }
        }

        private void CmdSearchHangHoa_Click(object sender, EventArgs e)
        {
            Rectangle displayRectangle = this.CmdSearchHangHoa.DisplayRectangle;
            displayRectangle = this.CmdSearchHangHoa.RectangleToScreen(displayRectangle);
            Point point = new Point(displayRectangle.Left, displayRectangle.Bottom);
            object obj2 = point;
            object[] objArray = new object[2];
            object instance = obj2;
            objArray[0] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(instance, null, "X", new object[0], null, null, null));
            object obj4 = obj2;
            objArray[1] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(obj4, null, "Y", new object[0], null, null, null));
            object[] arguments = objArray;
            bool[] copyBack = new bool[] { true, true };
            NewLateBinding.LateCall(this.CmdTimPhieuNhap, null, "Show", arguments, null, null, copyBack, true);
            if (copyBack[0])
            {
                NewLateBinding.LateSetComplex(instance, null, "X", new object[] { RuntimeHelpers.GetObjectValue(arguments[0]) }, null, null, true, false);
            }
            if (copyBack[1])
            {
                NewLateBinding.LateSetComplex(obj4, null, "Y", new object[] { RuntimeHelpers.GetObjectValue(arguments[1]) }, null, null, true, false);
            }
        }

        private void CmdTimNhapKhau_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_NhapKhauList.objFrmCall = this;
            MyProject.Forms.Frm_NhapKhauList.ShowDialog();
        }

        private void CmdTimNhapKho_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_NhapKhoList.objFrmCall = this;
            MyProject.Forms.Frm_NhapKhoList.ShowDialog();
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaOld, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoa = this.cFrmKhoaOld;
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
            }
            if (this.cFrmTask == "I")
            {
                this.objSoCT.UndoVoucher(LVYModule.sLeft(LVYModule.Date2Char(this.TxtNgayChungTu.Text), 6));
            }
            this.cFrmTask = "";
            this.EnabledControl = false;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.CboLoaiTien.SelectedValue = "";
            this.TxtTyGia.Value = 0;
            this.CboLoaiHoaDon.SelectedValue = "";
            this.TxtSoSeri.Text = "";
            this.TxtSoHoaDon.Text = "";
            this.AdvNhaCungCap.Value = "";
            this.AdvTKThanhToan.Value = "";
            this.AdvTKThue.Value = "";
            this.TxtDienGiaiPhi.Text = "";
            this.TxtTienPhi.Value = 0;
            this.TxtTienPhiNT.Value = 0;
            this.TxtTienThuePhiNT.Value = 0;
            this.TxtTienThuePhi.Value = 0;
            this.TxtSoCT.Text = "";
            this.TxtNgayCT.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
            this.VSlist.Select(0, 1);
            this.VSlist.Rows.Count = 1;
            this.cFrmKhoa = "";
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                this.VSlist[i, 0x10] = 0;
                this.VSlist[i, 0x11] = 0;
                this.VSlist[i, 0x12] = 0;
            }
            this.txtMST.Text = "";
            this.CboKhaiThue.SelectedValue = "";
            this.CboLoaiChiPhi.SelectedValue = "";
            this.TxtSoChungTu.Text = "";
        }

        public void FormatNumber()
        {
            LVYModule.advFormatNumber(this.TxtTyGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienPhiNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienPhi, modGeneral.H_FORMATNUMBER);
            LVYModule.advFormatNumber(this.TxtTienThuePhiNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienThuePhi, modGeneral.H_FORMATNUMBER);
        }

        private void Frm_ChiPhiMuaHang_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.EnabledControl = false;
                this.InitCombo();
                this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                vSlist.Cols[6].Visible = modGeneral.H_THEODOISOLOHANG;
                vSlist.Cols[7].Visible = modGeneral.H_THEODOISERI;
                vSlist.Cols[9].Visible = modGeneral.H_THEODOIHANDUNG;
                vSlist = null;
                BuildComboModule.InitComboDatatype(this.CboLoaiDuLieu);
                BuildComboModule.BuildCombo(this.CboKhaiThue, modGeneral.ListDanhMuc.HangMucBaoCaoThue, false, " LoaiPhatSinh = 'MV' ", "");
                this.PNDungChung.Visible = modGeneral.H_KETHOPDULIEUTHUE;
                if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.ShowData(this.cFrmKhoa);
                }
                else if (LVYModule.ReturnIfNull(this.cFrmKhoaPhieuNhap, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.ShowDataPhieuNhap(this.cFrmKhoaPhieuNhap);
                }
                else
                {
                    this.EmptyData();
                }
            }
        }

        public void InitCombo()
        {
            BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
            BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
            BuildComboModule.BuildCombo(this.CboLoaiHoaDon, modGeneral.ListDanhMuc.LoaiHoaDon, false, " LoaiPhatSinh = 'MV'", "");
            BuildComboModule.BuildCombo(this.CboLoaiHoaDon, modGeneral.ListDanhMuc.LoaiHoaDon, false, " LoaiPhatSinh = 'MV'", "");
            BuildComboModule.BuildCombo(this.CboLoaiChiPhi, modGeneral.ListDanhMuc.LoaiChiPhi, false, "", "");
            this.CboPhanBo.DataSource = modGeneral.H_PPPB;
            this.CboPhanBo.ValueMember = "Ma";
            this.CboPhanBo.DisplayMember = "Ten";
            this.CboLoaiTien.SelectedIndex = 0;
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_ChiPhiMuaHang));
            this.TxtNgayHoaDon = new DateTimePicker();
            this.Label50 = new Label();
            this.TxtSoHoaDon = new TextBox();
            this.CboLoaiHoaDon = new ComboBox();
            this.Label51 = new Label();
            this.CboPhanBo = new ComboBox();
            this.Label47 = new Label();
            this.TxtTienPhiNT = new C1NumericEdit();
            this.Label48 = new Label();
            this.Label52 = new Label();
            this.Label53 = new Label();
            this.Label49 = new Label();
            this.TxtDienGiaiPhi = new TextBox();
            this.Label63 = new Label();
            this.TxtTienThuePhi = new C1NumericEdit();
            this.Label59 = new Label();
            this.TxtTienThuePhiNT = new C1NumericEdit();
            this.Label60 = new Label();
            this.CboLoaiTien = new ComboBox();
            this.TxtTyGia = new C1NumericEdit();
            this.Label56 = new Label();
            this.Label57 = new Label();
            this.Label55 = new Label();
            this.TxtTienPhi = new C1NumericEdit();
            this.Label54 = new Label();
            this.TxtThueSuat = new C1NumericEdit();
            this.Label19 = new Label();
            this.Label42 = new Label();
            this.TxtSoSeri = new TextBox();
            this.Label26 = new Label();
            this.txtMST = new TextBox();
            this.CboKhaiThue = new ComboBox();
            this.Label25 = new Label();
            this.Label23 = new Label();
            this.TxtNgayCT = new DateTimePicker();
            this.Label24 = new Label();
            this.TxtSoCT = new TextBox();
            this.CmdSearchHangHoa = new Button();
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.Label1 = new Label();
            this.TxtSoChungTu = new TextBox();
            this.CboLoaiChiPhi = new ComboBox();
            this.Label64 = new Label();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.ToolStripButton2 = new ToolStripButton();
            this.CmdExit = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.CmdAdd = new ToolStripButton();
            this.CmdSave = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.ImageList1 = new ImageList(this.components);
            this.CmdFind = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.CmdPrint = new ToolStripButton();
            this.ToolStrip1 = new ToolStrip();
            this.CmdTimNhapKho = new ToolStripMenuItem();
            this.CmdTimNhapKhau = new ToolStripMenuItem();
            this.CmdTimPhieuNhap = new ContextMenuStrip(this.components);
            this.Label2 = new Label();
            this.DateTimePicker1 = new DateTimePicker();
            this.Button1 = new Button();
            this.Label3 = new Label();
            this.TextBox1 = new TextBox();
            this.ComboBox1 = new ComboBox();
            this.Label4 = new Label();
            this.TextBox2 = new TextBox();
            this.Label5 = new Label();
            this.C1NumericEdit1 = new C1NumericEdit();
            this.Label6 = new Label();
            this.C1NumericEdit2 = new C1NumericEdit();
            this.Label7 = new Label();
            this.ComboBox2 = new ComboBox();
            this.C1NumericEdit3 = new C1NumericEdit();
            this.Label8 = new Label();
            this.Label9 = new Label();
            this.Label10 = new Label();
            this.C1NumericEdit4 = new C1NumericEdit();
            this.Label11 = new Label();
            this.C1NumericEdit5 = new C1NumericEdit();
            this.Label12 = new Label();
            this.Label14 = new Label();
            this.TextBox3 = new TextBox();
            this.Label15 = new Label();
            this.DateTimePicker2 = new DateTimePicker();
            this.Label16 = new Label();
            this.TextBox4 = new TextBox();
            this.ComboBox3 = new ComboBox();
            this.Label17 = new Label();
            this.ComboBox4 = new ComboBox();
            this.Label18 = new Label();
            this.C1NumericEdit6 = new C1NumericEdit();
            this.Label20 = new Label();
            this.Label21 = new Label();
            this.Label22 = new Label();
            this.PNDungChung = new Panel();
            this.CmdChuyen = new Button();
            this.CboLoaiDuLieu = new ComboBox();
            this.C1DockingTab2 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.AdvNhaCungCap = new ADVObjects();
            this.AdvTKThanhToan = new ADVAccount();
            this.AdvTKThue = new ADVAccount();
            this.AdvAccount1 = new ADVAccount();
            this.AdvAccount2 = new ADVAccount();
            this.AdvObjects1 = new ADVObjects();
            ((ISupportInitialize) this.TxtTienPhiNT).BeginInit();
            ((ISupportInitialize) this.TxtTienThuePhi).BeginInit();
            ((ISupportInitialize) this.TxtTienThuePhiNT).BeginInit();
            ((ISupportInitialize) this.TxtTyGia).BeginInit();
            ((ISupportInitialize) this.TxtTienPhi).BeginInit();
            ((ISupportInitialize) this.TxtThueSuat).BeginInit();
            this.VSlist.BeginInit();
            this.ToolStrip1.SuspendLayout();
            this.CmdTimPhieuNhap.SuspendLayout();
            ((ISupportInitialize) this.C1NumericEdit1).BeginInit();
            ((ISupportInitialize) this.C1NumericEdit2).BeginInit();
            ((ISupportInitialize) this.C1NumericEdit3).BeginInit();
            ((ISupportInitialize) this.C1NumericEdit4).BeginInit();
            ((ISupportInitialize) this.C1NumericEdit5).BeginInit();
            ((ISupportInitialize) this.C1NumericEdit6).BeginInit();
            this.PNDungChung.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab2).BeginInit();
            this.C1DockingTab2.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage2.SuspendLayout();
            this.SuspendLayout();
            this.TxtNgayHoaDon.Format = DateTimePickerFormat.Custom;
            Point point = new Point(0x2b5, 0x24);
            this.TxtNgayHoaDon.Location = point;
            this.TxtNgayHoaDon.Name = "TxtNgayHoaDon";
            Size size = new Size(0x61, 20);
            this.TxtNgayHoaDon.Size = size;
            this.TxtNgayHoaDon.TabIndex = 13;
            this.Label50.AutoSize = true;
            this.Label50.BackColor = Color.Transparent;
            point = new Point(0x19d, 0x27);
            this.Label50.Location = point;
            this.Label50.Name = "Label50";
            size = new Size(0x3f, 13);
            this.Label50.Size = size;
            this.Label50.TabIndex = 0x17;
            this.Label50.Text = "Số h\x00f3a đơn";
            point = new Point(0x1f6, 0x24);
            this.TxtSoHoaDon.Location = point;
            this.TxtSoHoaDon.Name = "TxtSoHoaDon";
            size = new Size(0x6b, 20);
            this.TxtSoHoaDon.Size = size;
            this.TxtSoHoaDon.TabIndex = 12;
            this.CboLoaiHoaDon.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiHoaDon.FormattingEnabled = true;
            point = new Point(0x325, 0x35);
            this.CboLoaiHoaDon.Location = point;
            this.CboLoaiHoaDon.Name = "CboLoaiHoaDon";
            size = new Size(0x57, 0x15);
            this.CboLoaiHoaDon.Size = size;
            this.CboLoaiHoaDon.TabIndex = 0x16;
            this.CboLoaiHoaDon.Visible = false;
            this.Label51.AutoSize = true;
            this.Label51.BackColor = Color.Transparent;
            point = new Point(0x331, 0x55);
            this.Label51.Location = point;
            this.Label51.Name = "Label51";
            size = new Size(70, 13);
            this.Label51.Size = size;
            this.Label51.TabIndex = 0x15;
            this.Label51.Text = "Loại h\x00f3a đơn";
            this.Label51.TextAlign = ContentAlignment.TopRight;
            this.Label51.Visible = false;
            this.CboPhanBo.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboPhanBo.FormattingEnabled = true;
            point = new Point(0x1f6, 0x97);
            this.CboPhanBo.Location = point;
            this.CboPhanBo.Name = "CboPhanBo";
            size = new Size(0x120, 0x15);
            this.CboPhanBo.Size = size;
            this.CboPhanBo.TabIndex = 0x16;
            this.Label47.AutoSize = true;
            this.Label47.BackColor = Color.Transparent;
            point = new Point(0x19d, 0x9b);
            this.Label47.Location = point;
            this.Label47.Name = "Label47";
            size = new Size(0x2f, 13);
            this.Label47.Size = size;
            this.Label47.TabIndex = 0x27;
            this.Label47.Text = "Ph\x00e2n bổ";
            this.Label47.TextAlign = ContentAlignment.TopRight;
            this.TxtTienPhiNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienPhiNT.DataType = typeof(double);
            this.TxtTienPhiNT.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x1f6, 0x69);
            this.TxtTienPhiNT.Location = point;
            this.TxtTienPhiNT.Name = "TxtTienPhiNT";
            Padding padding = new Padding(1);
            this.TxtTienPhiNT.Padding = padding;
            size = new Size(0x6b, 20);
            this.TxtTienPhiNT.Size = size;
            this.TxtTienPhiNT.TabIndex = 0x12;
            this.TxtTienPhiNT.Tag = null;
            this.TxtTienPhiNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTienPhiNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienPhiNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienPhiNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label48.AutoSize = true;
            this.Label48.BackColor = Color.Transparent;
            point = new Point(0x19d, 0x6d);
            this.Label48.Location = point;
            this.Label48.Name = "Label48";
            size = new Size(0x2f, 13);
            this.Label48.Size = size;
            this.Label48.TabIndex = 0x1f;
            this.Label48.Text = "Tiền ph\x00ed";
            this.Label52.AutoSize = true;
            this.Label52.BackColor = Color.Transparent;
            point = new Point(0x12, 0x55);
            this.Label52.Location = point;
            this.Label52.Name = "Label52";
            size = new Size(70, 13);
            this.Label52.Size = size;
            this.Label52.TabIndex = 11;
            this.Label52.Text = "T\x00e0i khoản c\x00f3";
            this.Label53.AutoEllipsis = true;
            this.Label53.AutoSize = true;
            this.Label53.BackColor = Color.Transparent;
            point = new Point(0x12, 0x83);
            this.Label53.Location = point;
            this.Label53.Name = "Label53";
            this.Label53.RightToLeft = RightToLeft.No;
            size = new Size(0x4b, 13);
            this.Label53.Size = size;
            this.Label53.TabIndex = 15;
            this.Label53.Text = "Nh\x00e0 cung cấp";
            this.Label53.TextAlign = ContentAlignment.TopRight;
            this.Label49.AutoSize = true;
            this.Label49.BackColor = Color.Transparent;
            point = new Point(0x266, 0x27);
            this.Label49.Location = point;
            this.Label49.Name = "Label49";
            size = new Size(0x4b, 13);
            this.Label49.Size = size;
            this.Label49.TabIndex = 0x19;
            this.Label49.Text = "Ng\x00e0y h\x00f3a đơn";
            point = new Point(0x70, 0xb0);
            this.TxtDienGiaiPhi.Location = point;
            this.TxtDienGiaiPhi.Name = "TxtDienGiaiPhi";
            size = new Size(0x2a6, 20);
            this.TxtDienGiaiPhi.Size = size;
            this.TxtDienGiaiPhi.TabIndex = 10;
            this.Label63.AutoEllipsis = true;
            this.Label63.AutoSize = true;
            this.Label63.BackColor = Color.Transparent;
            point = new Point(0x13, 0xb3);
            this.Label63.Location = point;
            this.Label63.Name = "Label63";
            this.Label63.RightToLeft = RightToLeft.No;
            size = new Size(0x30, 13);
            this.Label63.Size = size;
            this.Label63.TabIndex = 0x29;
            this.Label63.Text = "Diễn giải";
            this.Label63.TextAlign = ContentAlignment.TopRight;
            this.TxtTienThuePhi.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienThuePhi.DataType = typeof(double);
            this.TxtTienThuePhi.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x2b5, 0x80);
            this.TxtTienThuePhi.Location = point;
            this.TxtTienThuePhi.Name = "TxtTienThuePhi";
            padding = new Padding(1);
            this.TxtTienThuePhi.Padding = padding;
            this.TxtTienThuePhi.ReadOnly = true;
            size = new Size(0x61, 20);
            this.TxtTienThuePhi.Size = size;
            this.TxtTienThuePhi.TabIndex = 0x15;
            this.TxtTienThuePhi.Tag = null;
            this.TxtTienThuePhi.TextAlign = HorizontalAlignment.Right;
            this.TxtTienThuePhi.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienThuePhi.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienThuePhi.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label59.AutoSize = true;
            this.Label59.BackColor = Color.Transparent;
            point = new Point(0x266, 0x84);
            this.Label59.Location = point;
            this.Label59.Name = "Label59";
            size = new Size(0x2c, 13);
            this.Label59.Size = size;
            this.Label59.TabIndex = 0x25;
            this.Label59.Text = "Quy đổi";
            this.TxtTienThuePhiNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienThuePhiNT.DataType = typeof(double);
            this.TxtTienThuePhiNT.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x1f6, 0x80);
            this.TxtTienThuePhiNT.Location = point;
            this.TxtTienThuePhiNT.Name = "TxtTienThuePhiNT";
            padding = new Padding(1);
            this.TxtTienThuePhiNT.Padding = padding;
            this.TxtTienThuePhiNT.ReadOnly = true;
            size = new Size(0x6b, 20);
            this.TxtTienThuePhiNT.Size = size;
            this.TxtTienThuePhiNT.TabIndex = 20;
            this.TxtTienThuePhiNT.Tag = null;
            this.TxtTienThuePhiNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTienThuePhiNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienThuePhiNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienThuePhiNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label60.AutoSize = true;
            this.Label60.BackColor = Color.Transparent;
            point = new Point(0x19d, 0x84);
            this.Label60.Location = point;
            this.Label60.Name = "Label60";
            size = new Size(0x44, 13);
            this.Label60.Size = size;
            this.Label60.TabIndex = 0x23;
            this.Label60.Text = "Thuế chi ph\x00ed";
            this.CboLoaiTien.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x1f6, 0x52);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x6c, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 0x10;
            this.TxtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTyGia.DataType = typeof(double);
            this.TxtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(690, 0x52);
            this.TxtTyGia.Location = point;
            this.TxtTyGia.Name = "TxtTyGia";
            padding = new Padding(1);
            this.TxtTyGia.Padding = padding;
            size = new Size(100, 20);
            this.TxtTyGia.Size = size;
            this.TxtTyGia.TabIndex = 0x11;
            this.TxtTyGia.Tag = null;
            this.TxtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.TxtTyGia.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTyGia.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label56.AutoSize = true;
            this.Label56.BackColor = Color.Transparent;
            point = new Point(0x19d, 0x55);
            this.Label56.Location = point;
            this.Label56.Name = "Label56";
            size = new Size(0x2f, 13);
            this.Label56.Size = size;
            this.Label56.TabIndex = 0x11;
            this.Label56.Text = "Loại tiền";
            this.Label56.TextAlign = ContentAlignment.TopRight;
            this.Label57.AutoSize = true;
            this.Label57.BackColor = Color.Transparent;
            point = new Point(0x268, 0x55);
            this.Label57.Location = point;
            this.Label57.Name = "Label57";
            size = new Size(0x24, 13);
            this.Label57.Size = size;
            this.Label57.TabIndex = 0x13;
            this.Label57.Text = "Tỷ gi\x00e1";
            this.Label57.TextAlign = ContentAlignment.TopRight;
            this.Label55.AutoSize = true;
            this.Label55.BackColor = Color.Transparent;
            point = new Point(0x12, 0x6c);
            this.Label55.Location = point;
            this.Label55.Name = "Label55";
            size = new Size(0x52, 13);
            this.Label55.Size = size;
            this.Label55.TabIndex = 13;
            this.Label55.Text = "T\x00e0i khoản thu\x00eá";
            this.TxtTienPhi.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienPhi.DataType = typeof(double);
            this.TxtTienPhi.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x2b5, 0x69);
            this.TxtTienPhi.Location = point;
            this.TxtTienPhi.Name = "TxtTienPhi";
            padding = new Padding(1);
            this.TxtTienPhi.Padding = padding;
            this.TxtTienPhi.ReadOnly = true;
            size = new Size(0x61, 20);
            this.TxtTienPhi.Size = size;
            this.TxtTienPhi.TabIndex = 0x13;
            this.TxtTienPhi.Tag = null;
            this.TxtTienPhi.TextAlign = HorizontalAlignment.Right;
            this.TxtTienPhi.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienPhi.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienPhi.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label54.AutoSize = true;
            this.Label54.BackColor = Color.Transparent;
            point = new Point(0x266, 0x6d);
            this.Label54.Location = point;
            this.Label54.Name = "Label54";
            size = new Size(0x2c, 13);
            this.Label54.Size = size;
            this.Label54.TabIndex = 0x21;
            this.Label54.Text = "Quy đổi";
            this.TxtThueSuat.BorderStyle = BorderStyle.FixedSingle;
            this.TxtThueSuat.DataType = typeof(short);
            this.TxtThueSuat.FormatType = FormatTypeEnum.Integer;
            point = new Point(0x2b5, 0x3b);
            this.TxtThueSuat.Location = point;
            this.TxtThueSuat.Name = "TxtThueSuat";
            padding = new Padding(1);
            this.TxtThueSuat.Padding = padding;
            size = new Size(0x61, 20);
            this.TxtThueSuat.Size = size;
            this.TxtThueSuat.TabIndex = 15;
            this.TxtThueSuat.Tag = null;
            this.TxtThueSuat.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.TxtThueSuat.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtThueSuat.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label19.AutoSize = true;
            this.Label19.BackColor = Color.Transparent;
            point = new Point(0x266, 0x3e);
            this.Label19.Location = point;
            this.Label19.Name = "Label19";
            size = new Size(0x37, 13);
            this.Label19.Size = size;
            this.Label19.TabIndex = 0x1d;
            this.Label19.Text = "Thuế suất";
            this.Label19.TextAlign = ContentAlignment.TopRight;
            this.Label42.AutoSize = true;
            this.Label42.BackColor = Color.Transparent;
            point = new Point(0x19d, 0x3e);
            this.Label42.Location = point;
            this.Label42.Name = "Label42";
            size = new Size(0x27, 13);
            this.Label42.Size = size;
            this.Label42.TabIndex = 0x1b;
            this.Label42.Text = "Số seri";
            point = new Point(0x1f6, 0x3b);
            this.TxtSoSeri.Location = point;
            this.TxtSoSeri.Name = "TxtSoSeri";
            size = new Size(0x6b, 20);
            this.TxtSoSeri.Size = size;
            this.TxtSoSeri.TabIndex = 14;
            this.Label26.AutoSize = true;
            this.Label26.BackColor = Color.Transparent;
            point = new Point(0x13, 0x9a);
            this.Label26.Location = point;
            this.Label26.Name = "Label26";
            size = new Size(30, 13);
            this.Label26.Size = size;
            this.Label26.TabIndex = 0x2b;
            this.Label26.Text = "MST";
            point = new Point(0x70, 0x97);
            this.txtMST.Location = point;
            this.txtMST.Name = "txtMST";
            size = new Size(280, 20);
            this.txtMST.Size = size;
            this.txtMST.TabIndex = 9;
            this.CboKhaiThue.FormattingEnabled = true;
            point = new Point(0x1f6, 10);
            this.CboKhaiThue.Location = point;
            this.CboKhaiThue.Name = "CboKhaiThue";
            size = new Size(0x120, 0x15);
            this.CboKhaiThue.Size = size;
            this.CboKhaiThue.TabIndex = 11;
            this.Label25.AutoSize = true;
            this.Label25.BackColor = Color.Transparent;
            point = new Point(0x19d, 0x10);
            this.Label25.Location = point;
            this.Label25.Name = "Label25";
            size = new Size(0x34, 13);
            this.Label25.Size = size;
            this.Label25.TabIndex = 40;
            this.Label25.Text = "Khai thuế";
            this.Label23.AutoSize = true;
            this.Label23.BackColor = Color.Transparent;
            point = new Point(0xf2, 40);
            this.Label23.Location = point;
            this.Label23.Name = "Label23";
            size = new Size(0x20, 13);
            this.Label23.Size = size;
            this.Label23.TabIndex = 7;
            this.Label23.Text = "Ng\x00e0y";
            this.TxtNgayCT.Enabled = false;
            this.TxtNgayCT.Format = DateTimePickerFormat.Custom;
            point = new Point(0x12d, 0x23);
            this.TxtNgayCT.Location = point;
            this.TxtNgayCT.Name = "TxtNgayCT";
            size = new Size(0x5b, 20);
            this.TxtNgayCT.Size = size;
            this.TxtNgayCT.TabIndex = 4;
            this.Label24.AutoSize = true;
            this.Label24.BackColor = Color.Transparent;
            point = new Point(0x12, 0x27);
            this.Label24.Location = point;
            this.Label24.Name = "Label24";
            size = new Size(0x41, 13);
            this.Label24.Size = size;
            this.Label24.TabIndex = 5;
            this.Label24.Text = "Số chứng từ";
            point = new Point(0x70, 0x23);
            this.TxtSoCT.Location = point;
            this.TxtSoCT.Name = "TxtSoCT";
            size = new Size(0x74, 20);
            this.TxtSoCT.Size = size;
            this.TxtSoCT.TabIndex = 3;
            this.CmdSearchHangHoa.FlatStyle = FlatStyle.System;
            point = new Point(0xce, 11);
            this.CmdSearchHangHoa.Location = point;
            this.CmdSearchHangHoa.Name = "CmdSearchHangHoa";
            size = new Size(0x16, 0x16);
            this.CmdSearchHangHoa.Size = size;
            this.CmdSearchHangHoa.TabIndex = 1;
            this.CmdSearchHangHoa.Text = "...";
            this.CmdSearchHangHoa.UseVisualStyleBackColor = true;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(0xf2, 0x10);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x20, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 3;
            this.Label13.Text = "Ng\x00e0y";
            this.TxtNgayChungTu.Enabled = false;
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Custom;
            point = new Point(0x12d, 12);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(0x5b, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 2;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(0x12, 15);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x4c, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0;
            this.Label1.Text = "Số phiếu nhập";
            point = new Point(0x70, 12);
            this.TxtSoChungTu.Location = point;
            this.TxtSoChungTu.Name = "TxtSoChungTu";
            this.TxtSoChungTu.ReadOnly = true;
            size = new Size(0x5e, 20);
            this.TxtSoChungTu.Size = size;
            this.TxtSoChungTu.TabIndex = 0;
            this.CboLoaiChiPhi.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiChiPhi.FormattingEnabled = true;
            point = new Point(0x70, 0x3a);
            this.CboLoaiChiPhi.Location = point;
            this.CboLoaiChiPhi.Name = "CboLoaiChiPhi";
            size = new Size(280, 0x15);
            this.CboLoaiChiPhi.Size = size;
            this.CboLoaiChiPhi.TabIndex = 5;
            this.Label64.AutoSize = true;
            this.Label64.BackColor = Color.Transparent;
            point = new Point(0x12, 0x3d);
            this.Label64.Location = point;
            this.Label64.Name = "Label64";
            size = new Size(0x3f, 13);
            this.Label64.Size = size;
            this.Label64.TabIndex = 9;
            this.Label64.Text = "Loại chi ph\x00ed";
            this.Label64.TextAlign = ContentAlignment.TopRight;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0);
            this.VSlist.Location = point;
            padding = new Padding(0);
            this.VSlist.Margin = padding;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.Rows.MinSize = 20;
            size = new Size(890, 0x121);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.ToolStripButton2.Alignment = ToolStripItemAlignment.Right;
            this.ToolStripButton2.Image = (Image) manager.GetObject("ToolStripButton2.Image");
            this.ToolStripButton2.ImageScaling = ToolStripItemImageScaling.None;
            this.ToolStripButton2.ImageTransparentColor = Color.White;
            this.ToolStripButton2.Name = "ToolStripButton2";
            size = new Size(0x31, 0x16);
            this.ToolStripButton2.Size = size;
            this.ToolStripButton2.Text = "&Help";
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x37, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2d, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x48, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2d, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.ImageList1.ImageStream = (ImageListStreamer) manager.GetObject("ImageList1.ImageStream");
            this.ImageList1.TransparentColor = Color.Transparent;
            this.ImageList1.Images.SetKeyName(0, "orders_main.png");
            this.ImageList1.Images.SetKeyName(1, "checkingacct.png");
            this.ImageList1.Images.SetKeyName(2, "billing.png");
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x43, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x37, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.CmdPrint.Visible = false;
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.ToolStripButton2 });
            point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            size = new Size(0x37c, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 0;
            this.ToolStrip1.Text = "ToolStrip1";
            this.CmdTimNhapKho.Name = "CmdTimNhapKho";
            size = new Size(0xbd, 0x16);
            this.CmdTimNhapKho.Size = size;
            this.CmdTimNhapKho.Text = "H\x00e0ng mua trong nước";
            this.CmdTimNhapKhau.Name = "CmdTimNhapKhau";
            size = new Size(0xbd, 0x16);
            this.CmdTimNhapKhau.Size = size;
            this.CmdTimNhapKhau.Text = "H\x00e0ng nhập khẩu";
            this.CmdTimPhieuNhap.Items.AddRange(new ToolStripItem[] { this.CmdTimNhapKho, this.CmdTimNhapKhau });
            this.CmdTimPhieuNhap.Name = "ContextMenuStrip1";
            size = new Size(190, 70);
            this.CmdTimPhieuNhap.Size = size;
            this.Label2.AutoSize = true;
            point = new Point(0xe7, 12);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x20, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0xef;
            this.Label2.Text = "Ng\x00e0y";
            this.DateTimePicker1.Enabled = false;
            this.DateTimePicker1.Format = DateTimePickerFormat.Custom;
            point = new Point(290, 8);
            this.DateTimePicker1.Location = point;
            this.DateTimePicker1.Name = "DateTimePicker1";
            size = new Size(0x5b, 20);
            this.DateTimePicker1.Size = size;
            this.DateTimePicker1.TabIndex = 240;
            this.Button1.FlatStyle = FlatStyle.System;
            point = new Point(0xc3, 7);
            this.Button1.Location = point;
            this.Button1.Name = "Button1";
            size = new Size(0x16, 0x16);
            this.Button1.Size = size;
            this.Button1.TabIndex = 0xf1;
            this.Button1.Text = "...";
            this.Button1.UseVisualStyleBackColor = true;
            this.Label3.AutoSize = true;
            point = new Point(8, 11);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x5c, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0xed;
            this.Label3.Text = "Số chứng từ nhập";
            point = new Point(0x65, 8);
            this.TextBox1.Location = point;
            this.TextBox1.Name = "TextBox1";
            this.TextBox1.ReadOnly = true;
            size = new Size(0x5e, 20);
            this.TextBox1.Size = size;
            this.TextBox1.TabIndex = 0xee;
            this.ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
            this.ComboBox1.FormattingEnabled = true;
            point = new Point(0x65, 0x36);
            this.ComboBox1.Location = point;
            this.ComboBox1.Name = "ComboBox1";
            size = new Size(280, 0x15);
            this.ComboBox1.Size = size;
            this.ComboBox1.TabIndex = 0x3b;
            this.Label4.AutoSize = true;
            point = new Point(7, 0x39);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x3f, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0xec;
            this.Label4.Text = "Loại chi ph\x00ed";
            this.Label4.TextAlign = ContentAlignment.TopRight;
            point = new Point(0x1eb, 0x95);
            this.TextBox2.Location = point;
            this.TextBox2.Name = "TextBox2";
            size = new Size(0x120, 20);
            this.TextBox2.Size = size;
            this.TextBox2.TabIndex = 0x59;
            this.Label5.AutoEllipsis = true;
            this.Label5.AutoSize = true;
            point = new Point(0x192, 0x98);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            this.Label5.RightToLeft = RightToLeft.No;
            size = new Size(0x30, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0xeb;
            this.Label5.Text = "Diễn giải";
            this.Label5.TextAlign = ContentAlignment.TopRight;
            this.C1NumericEdit1.DataType = typeof(double);
            this.C1NumericEdit1.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x2aa, 0x65);
            this.C1NumericEdit1.Location = point;
            this.C1NumericEdit1.Name = "C1NumericEdit1";
            this.C1NumericEdit1.ReadOnly = true;
            size = new Size(0x61, 20);
            this.C1NumericEdit1.Size = size;
            this.C1NumericEdit1.TabIndex = 0x58;
            this.C1NumericEdit1.Tag = null;
            this.C1NumericEdit1.TextAlign = HorizontalAlignment.Right;
            this.C1NumericEdit1.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label6.AutoSize = true;
            point = new Point(0x25b, 0x69);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x2c, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x57;
            this.Label6.Text = "Quy đ\x00f4̉i";
            this.C1NumericEdit2.DataType = typeof(double);
            this.C1NumericEdit2.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x1eb, 0x65);
            this.C1NumericEdit2.Location = point;
            this.C1NumericEdit2.Name = "C1NumericEdit2";
            this.C1NumericEdit2.ReadOnly = true;
            size = new Size(0x6b, 20);
            this.C1NumericEdit2.Size = size;
            this.C1NumericEdit2.TabIndex = 0x56;
            this.C1NumericEdit2.Tag = null;
            this.C1NumericEdit2.TextAlign = HorizontalAlignment.Right;
            this.C1NumericEdit2.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label7.AutoSize = true;
            point = new Point(0x192, 0x69);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x44, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0x55;
            this.Label7.Text = "Thu\x00eá chi phí";
            this.ComboBox2.DropDownStyle = ComboBoxStyle.DropDownList;
            this.ComboBox2.FormattingEnabled = true;
            point = new Point(0x65, 0x93);
            this.ComboBox2.Location = point;
            this.ComboBox2.Name = "ComboBox2";
            size = new Size(0x6c, 0x15);
            this.ComboBox2.Size = size;
            this.ComboBox2.TabIndex = 0x42;
            this.C1NumericEdit3.DataType = typeof(double);
            this.C1NumericEdit3.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x119, 0x93);
            this.C1NumericEdit3.Location = point;
            this.C1NumericEdit3.Name = "C1NumericEdit3";
            size = new Size(100, 20);
            this.C1NumericEdit3.Size = size;
            this.C1NumericEdit3.TabIndex = 0x44;
            this.C1NumericEdit3.Tag = null;
            this.C1NumericEdit3.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.Label8.AutoSize = true;
            point = new Point(7, 150);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x38, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 0x41;
            this.Label8.Text = "Nguy\x00ean t\x00eạ";
            this.Label8.TextAlign = ContentAlignment.TopRight;
            this.Label9.AutoSize = true;
            point = new Point(0xd6, 150);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            size = new Size(0x24, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 0x43;
            this.Label9.Text = "Tỷ giá";
            this.Label9.TextAlign = ContentAlignment.TopRight;
            this.Label10.AutoSize = true;
            point = new Point(7, 0x7f);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x4f, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 0x3f;
            this.Label10.Text = "T\x00e0i khoản thu\x00eá";
            this.C1NumericEdit4.DataType = typeof(double);
            this.C1NumericEdit4.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x2aa, 0x4e);
            this.C1NumericEdit4.Location = point;
            this.C1NumericEdit4.Name = "C1NumericEdit4";
            this.C1NumericEdit4.ReadOnly = true;
            size = new Size(0x61, 20);
            this.C1NumericEdit4.Size = size;
            this.C1NumericEdit4.TabIndex = 0x54;
            this.C1NumericEdit4.Tag = null;
            this.C1NumericEdit4.TextAlign = HorizontalAlignment.Right;
            this.C1NumericEdit4.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label11.AutoSize = true;
            point = new Point(0x25b, 0x52);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2c, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0x53;
            this.Label11.Text = "Quy đ\x00f4̉i";
            this.C1NumericEdit5.DataType = typeof(short);
            this.C1NumericEdit5.FormatType = FormatTypeEnum.Integer;
            point = new Point(0x2aa, 0x37);
            this.C1NumericEdit5.Location = point;
            this.C1NumericEdit5.Name = "C1NumericEdit5";
            size = new Size(0x61, 20);
            this.C1NumericEdit5.Size = size;
            this.C1NumericEdit5.TabIndex = 80;
            this.C1NumericEdit5.Tag = null;
            this.C1NumericEdit5.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.Label12.AutoSize = true;
            point = new Point(0x25b, 0x3a);
            this.Label12.Location = point;
            this.Label12.Name = "Label12";
            size = new Size(0x37, 13);
            this.Label12.Size = size;
            this.Label12.TabIndex = 0x4f;
            this.Label12.Text = "Thuế suất";
            this.Label12.TextAlign = ContentAlignment.TopRight;
            this.Label14.AutoSize = true;
            point = new Point(0x192, 0x3a);
            this.Label14.Location = point;
            this.Label14.Name = "Label14";
            size = new Size(0x27, 13);
            this.Label14.Size = size;
            this.Label14.TabIndex = 0x4d;
            this.Label14.Text = "Số seri";
            point = new Point(0x1eb, 0x37);
            this.TextBox3.Location = point;
            this.TextBox3.Name = "TextBox3";
            size = new Size(0x6b, 20);
            this.TextBox3.Size = size;
            this.TextBox3.TabIndex = 0x4e;
            this.Label15.AutoSize = true;
            point = new Point(0x25b, 0x23);
            this.Label15.Location = point;
            this.Label15.Name = "Label15";
            size = new Size(0x4b, 13);
            this.Label15.Size = size;
            this.Label15.TabIndex = 0x4b;
            this.Label15.Text = "Ng\x00e0y hóa đơn";
            this.DateTimePicker2.Format = DateTimePickerFormat.Custom;
            point = new Point(0x2aa, 0x20);
            this.DateTimePicker2.Location = point;
            this.DateTimePicker2.Name = "DateTimePicker2";
            size = new Size(0x61, 20);
            this.DateTimePicker2.Size = size;
            this.DateTimePicker2.TabIndex = 0x4c;
            this.Label16.AutoSize = true;
            point = new Point(0x192, 0x23);
            this.Label16.Location = point;
            this.Label16.Name = "Label16";
            size = new Size(0x3f, 13);
            this.Label16.Size = size;
            this.Label16.TabIndex = 0x49;
            this.Label16.Text = "Số h\x00f3a đơn";
            point = new Point(0x1eb, 0x20);
            this.TextBox4.Location = point;
            this.TextBox4.Name = "TextBox4";
            size = new Size(0x6b, 20);
            this.TextBox4.Size = size;
            this.TextBox4.TabIndex = 0x4a;
            this.ComboBox3.DropDownStyle = ComboBoxStyle.DropDownList;
            this.ComboBox3.FormattingEnabled = true;
            point = new Point(0x1eb, 8);
            this.ComboBox3.Location = point;
            this.ComboBox3.Name = "ComboBox3";
            size = new Size(0x120, 0x15);
            this.ComboBox3.Size = size;
            this.ComboBox3.TabIndex = 0x48;
            this.Label17.AutoSize = true;
            point = new Point(0x192, 12);
            this.Label17.Location = point;
            this.Label17.Name = "Label17";
            size = new Size(70, 13);
            this.Label17.Size = size;
            this.Label17.TabIndex = 0x47;
            this.Label17.Text = "Loại h\x00f3a đơn";
            this.Label17.TextAlign = ContentAlignment.TopRight;
            this.ComboBox4.DropDownStyle = ComboBoxStyle.DropDownList;
            this.ComboBox4.FormattingEnabled = true;
            point = new Point(0x1eb, 0x7c);
            this.ComboBox4.Location = point;
            this.ComboBox4.Name = "ComboBox4";
            size = new Size(0x120, 0x15);
            this.ComboBox4.Size = size;
            this.ComboBox4.TabIndex = 70;
            this.Label18.AutoSize = true;
            point = new Point(0x192, 0x80);
            this.Label18.Location = point;
            this.Label18.Name = "Label18";
            size = new Size(0x2f, 13);
            this.Label18.Size = size;
            this.Label18.TabIndex = 0x45;
            this.Label18.Text = "Ph\x00e2n b\x00f4̉";
            this.Label18.TextAlign = ContentAlignment.TopRight;
            this.C1NumericEdit6.DataType = typeof(double);
            this.C1NumericEdit6.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x1eb, 0x4e);
            this.C1NumericEdit6.Location = point;
            this.C1NumericEdit6.Name = "C1NumericEdit6";
            size = new Size(0x6b, 20);
            this.C1NumericEdit6.Size = size;
            this.C1NumericEdit6.TabIndex = 0x52;
            this.C1NumericEdit6.Tag = null;
            this.C1NumericEdit6.TextAlign = HorizontalAlignment.Right;
            this.C1NumericEdit6.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label20.AutoSize = true;
            point = new Point(0x192, 0x52);
            this.Label20.Location = point;
            this.Label20.Name = "Label20";
            size = new Size(0x2f, 13);
            this.Label20.Size = size;
            this.Label20.TabIndex = 0x51;
            this.Label20.Text = "Tiền ph\x00ed";
            this.Label21.AutoSize = true;
            point = new Point(7, 0x68);
            this.Label21.Location = point;
            this.Label21.Name = "Label21";
            size = new Size(70, 13);
            this.Label21.Size = size;
            this.Label21.TabIndex = 0x3d;
            this.Label21.Text = "T\x00e0i khoản c\x00f3";
            this.Label22.AutoEllipsis = true;
            this.Label22.AutoSize = true;
            point = new Point(7, 0x51);
            this.Label22.Location = point;
            this.Label22.Name = "Label22";
            this.Label22.RightToLeft = RightToLeft.No;
            size = new Size(0x4b, 13);
            this.Label22.Size = size;
            this.Label22.TabIndex = 0x3b;
            this.Label22.Text = "Nh\x00e0 cung cấp";
            this.Label22.TextAlign = ContentAlignment.TopRight;
            this.PNDungChung.Controls.Add(this.CmdChuyen);
            this.PNDungChung.Controls.Add(this.CboLoaiDuLieu);
            point = new Point(0x260, 0x19);
            this.PNDungChung.Location = point;
            this.PNDungChung.Name = "PNDungChung";
            size = new Size(0x11a, 0x15);
            this.PNDungChung.Size = size;
            this.PNDungChung.TabIndex = 30;
            this.PNDungChung.Visible = false;
            this.CmdChuyen.Font = new Font("Arial", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            point = new Point(0x101, 0);
            this.CmdChuyen.Location = point;
            this.CmdChuyen.Name = "CmdChuyen";
            size = new Size(0x18, 0x17);
            this.CmdChuyen.Size = size;
            this.CmdChuyen.TabIndex = 15;
            this.CmdChuyen.Text = ">";
            this.CmdChuyen.UseVisualStyleBackColor = true;
            this.CmdChuyen.Visible = false;
            this.CboLoaiDuLieu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiDuLieu.FormattingEnabled = true;
            point = new Point(0x5d, 1);
            this.CboLoaiDuLieu.Location = point;
            this.CboLoaiDuLieu.Name = "CboLoaiDuLieu";
            size = new Size(0xa3, 0x15);
            this.CboLoaiDuLieu.Size = size;
            this.CboLoaiDuLieu.TabIndex = 13;
            this.CboLoaiDuLieu.Visible = false;
            this.C1DockingTab2.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab2.Dock = DockStyle.Top;
            point = new Point(0, 0x19);
            this.C1DockingTab2.Location = point;
            this.C1DockingTab2.Name = "C1DockingTab2";
            this.C1DockingTab2.SelectedIndex = 1;
            size = new Size(0x37c, 0xe3);
            this.C1DockingTab2.Size = size;
            this.C1DockingTab2.TabIndex = 1;
            this.C1DockingTab2.TabsSpacing = 5;
            this.C1DockingTab2.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab2.VisualStyle = C1.Win.C1Command.VisualStyle.Custom;
            this.C1DockingTab2.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.Label26);
            this.C1DockingTabPage1.Controls.Add(this.TxtSoChungTu);
            this.C1DockingTabPage1.Controls.Add(this.txtMST);
            this.C1DockingTabPage1.Controls.Add(this.AdvNhaCungCap);
            this.C1DockingTabPage1.Controls.Add(this.CboKhaiThue);
            this.C1DockingTabPage1.Controls.Add(this.AdvTKThanhToan);
            this.C1DockingTabPage1.Controls.Add(this.Label25);
            this.C1DockingTabPage1.Controls.Add(this.AdvTKThue);
            this.C1DockingTabPage1.Controls.Add(this.Label23);
            this.C1DockingTabPage1.Controls.Add(this.Label53);
            this.C1DockingTabPage1.Controls.Add(this.TxtNgayCT);
            this.C1DockingTabPage1.Controls.Add(this.Label52);
            this.C1DockingTabPage1.Controls.Add(this.Label24);
            this.C1DockingTabPage1.Controls.Add(this.Label48);
            this.C1DockingTabPage1.Controls.Add(this.TxtSoCT);
            this.C1DockingTabPage1.Controls.Add(this.TxtTienPhiNT);
            this.C1DockingTabPage1.Controls.Add(this.CmdSearchHangHoa);
            this.C1DockingTabPage1.Controls.Add(this.Label47);
            this.C1DockingTabPage1.Controls.Add(this.Label13);
            this.C1DockingTabPage1.Controls.Add(this.CboPhanBo);
            this.C1DockingTabPage1.Controls.Add(this.TxtNgayChungTu);
            this.C1DockingTabPage1.Controls.Add(this.Label51);
            this.C1DockingTabPage1.Controls.Add(this.Label1);
            this.C1DockingTabPage1.Controls.Add(this.CboLoaiHoaDon);
            this.C1DockingTabPage1.Controls.Add(this.TxtSoHoaDon);
            this.C1DockingTabPage1.Controls.Add(this.CboLoaiChiPhi);
            this.C1DockingTabPage1.Controls.Add(this.Label50);
            this.C1DockingTabPage1.Controls.Add(this.Label64);
            this.C1DockingTabPage1.Controls.Add(this.TxtNgayHoaDon);
            this.C1DockingTabPage1.Controls.Add(this.TxtDienGiaiPhi);
            this.C1DockingTabPage1.Controls.Add(this.Label49);
            this.C1DockingTabPage1.Controls.Add(this.Label63);
            this.C1DockingTabPage1.Controls.Add(this.TxtSoSeri);
            this.C1DockingTabPage1.Controls.Add(this.TxtTienThuePhi);
            this.C1DockingTabPage1.Controls.Add(this.Label42);
            this.C1DockingTabPage1.Controls.Add(this.Label59);
            this.C1DockingTabPage1.Controls.Add(this.Label19);
            this.C1DockingTabPage1.Controls.Add(this.TxtTienThuePhiNT);
            this.C1DockingTabPage1.Controls.Add(this.TxtThueSuat);
            this.C1DockingTabPage1.Controls.Add(this.Label60);
            this.C1DockingTabPage1.Controls.Add(this.Label54);
            this.C1DockingTabPage1.Controls.Add(this.CboLoaiTien);
            this.C1DockingTabPage1.Controls.Add(this.TxtTienPhi);
            this.C1DockingTabPage1.Controls.Add(this.TxtTyGia);
            this.C1DockingTabPage1.Controls.Add(this.Label55);
            this.C1DockingTabPage1.Controls.Add(this.Label56);
            this.C1DockingTabPage1.Controls.Add(this.Label57);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(890, 0xc9);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Th\x00f4ng tin chi ph\x00ed mua h\x00e0ng";
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab1.Dock = DockStyle.Fill;
            point = new Point(0, 0xfc);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            this.C1DockingTab1.SelectedIndex = 1;
            size = new Size(0x37c, 0x13b);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 2;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Custom;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage2.Controls.Add(this.VSlist);
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(890, 0x121);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 0;
            this.C1DockingTabPage2.Text = "Chi tiết h\x00e0ng h\x00f3a";
            this.AdvNhaCungCap.Conditions = "";
            this.AdvNhaCungCap.LoaiDoiTuong = modGeneral.TypeObjects.NhaCungCap;
            point = new Point(0x70, 0x80);
            this.AdvNhaCungCap.Location = point;
            this.AdvNhaCungCap.Name = "AdvNhaCungCap";
            this.AdvNhaCungCap.ReadOnly = false;
            size = new Size(280, 20);
            this.AdvNhaCungCap.Size = size;
            this.AdvNhaCungCap.TabIndex = 8;
            this.AdvNhaCungCap.UpperText = true;
            this.AdvNhaCungCap.Value = "";
            this.AdvNhaCungCap.WidthCode = 80;
            this.AdvTKThanhToan.Conditions = "";
            this.AdvTKThanhToan.DefaultValue = "";
            this.AdvTKThanhToan.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKThanhToan.KeyFilter = "111|331|142";
            point = new Point(0x70, 0x52);
            this.AdvTKThanhToan.Location = point;
            padding = new Padding(0);
            this.AdvTKThanhToan.Margin = padding;
            this.AdvTKThanhToan.Name = "AdvTKThanhToan";
            this.AdvTKThanhToan.OnlyDigit = false;
            this.AdvTKThanhToan.ReadOnly = false;
            size = new Size(280, 20);
            this.AdvTKThanhToan.Size = size;
            this.AdvTKThanhToan.TabIndex = 6;
            this.AdvTKThanhToan.UpperText = true;
            this.AdvTKThanhToan.Value = "";
            this.AdvTKThanhToan.WithCode = 80;
            this.AdvTKThue.Conditions = "";
            this.AdvTKThue.DefaultValue = "";
            this.AdvTKThue.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKThue.KeyFilter = "133";
            point = new Point(0x70, 0x69);
            this.AdvTKThue.Location = point;
            padding = new Padding(0);
            this.AdvTKThue.Margin = padding;
            this.AdvTKThue.Name = "AdvTKThue";
            this.AdvTKThue.OnlyDigit = false;
            this.AdvTKThue.ReadOnly = false;
            size = new Size(280, 20);
            this.AdvTKThue.Size = size;
            this.AdvTKThue.TabIndex = 7;
            this.AdvTKThue.UpperText = true;
            this.AdvTKThue.Value = "";
            this.AdvTKThue.WithCode = 80;
            this.AdvAccount1.Conditions = "";
            this.AdvAccount1.DefaultValue = "";
            this.AdvAccount1.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvAccount1.KeyFilter = "133";
            point = new Point(0x65, 0x7c);
            this.AdvAccount1.Location = point;
            padding = new Padding(0);
            this.AdvAccount1.Margin = padding;
            this.AdvAccount1.Name = "AdvAccount1";
            this.AdvAccount1.OnlyDigit = false;
            this.AdvAccount1.ReadOnly = false;
            size = new Size(280, 20);
            this.AdvAccount1.Size = size;
            this.AdvAccount1.TabIndex = 0x40;
            this.AdvAccount1.UpperText = true;
            this.AdvAccount1.Value = "";
            this.AdvAccount1.WithCode = 80;
            this.AdvAccount2.Conditions = "";
            this.AdvAccount2.DefaultValue = "";
            this.AdvAccount2.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvAccount2.KeyFilter = "111|112|331";
            point = new Point(0x65, 0x65);
            this.AdvAccount2.Location = point;
            padding = new Padding(0);
            this.AdvAccount2.Margin = padding;
            this.AdvAccount2.Name = "AdvAccount2";
            this.AdvAccount2.OnlyDigit = false;
            this.AdvAccount2.ReadOnly = false;
            size = new Size(280, 20);
            this.AdvAccount2.Size = size;
            this.AdvAccount2.TabIndex = 0x3e;
            this.AdvAccount2.UpperText = true;
            this.AdvAccount2.Value = "";
            this.AdvAccount2.WithCode = 80;
            this.AdvObjects1.Conditions = "";
            this.AdvObjects1.LoaiDoiTuong = modGeneral.TypeObjects.NhaCungCap;
            point = new Point(0x65, 0x4e);
            this.AdvObjects1.Location = point;
            this.AdvObjects1.Name = "AdvObjects1";
            this.AdvObjects1.ReadOnly = false;
            size = new Size(280, 20);
            this.AdvObjects1.Size = size;
            this.AdvObjects1.TabIndex = 60;
            this.AdvObjects1.UpperText = true;
            this.AdvObjects1.Value = "";
            this.AdvObjects1.WidthCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x37c, 0x237);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.C1DockingTab1);
            this.Controls.Add(this.C1DockingTab2);
            this.Controls.Add(this.PNDungChung);
            this.Controls.Add(this.ToolStrip1);
            this.Name = "Frm_ChiPhiMuaHang";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "MH-0003";
            this.Text = "CHI PHI MUA HANG";
            ((ISupportInitialize) this.TxtTienPhiNT).EndInit();
            ((ISupportInitialize) this.TxtTienThuePhi).EndInit();
            ((ISupportInitialize) this.TxtTienThuePhiNT).EndInit();
            ((ISupportInitialize) this.TxtTyGia).EndInit();
            ((ISupportInitialize) this.TxtTienPhi).EndInit();
            ((ISupportInitialize) this.TxtThueSuat).EndInit();
            this.VSlist.EndInit();
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            this.CmdTimPhieuNhap.ResumeLayout(false);
            ((ISupportInitialize) this.C1NumericEdit1).EndInit();
            ((ISupportInitialize) this.C1NumericEdit2).EndInit();
            ((ISupportInitialize) this.C1NumericEdit3).EndInit();
            ((ISupportInitialize) this.C1NumericEdit4).EndInit();
            ((ISupportInitialize) this.C1NumericEdit5).EndInit();
            ((ISupportInitialize) this.C1NumericEdit6).EndInit();
            this.PNDungChung.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab2).EndInit();
            this.C1DockingTab2.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            this.C1DockingTabPage1.PerformLayout();
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage2.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void InsertPhieuNhap(object strKhoa)
        {
            this.cFrmKhoaPhieuNhap = Conversions.ToString(strKhoa);
            this.ShowDataPhieuNhap(Conversions.ToString(strKhoa));
        }

        private void MnuTaiSanCoDinh_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_TangTaiSanList.objFrmCall = this;
            MyProject.Forms.Frm_TangTaiSanList.ShowDialog();
        }

        public void PhanBoChiPhi()
        {
            double num3 = 0.0;
            double pTongSo = 0.0;
            double num5 = 0.0;
            double num2 = 0.0;
            double num4 = 0.0;
            int num7 = 0;
            if (!((LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboPhanBo.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "") | (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboPhanBo.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString() == "PB")))
            {
                num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienPhiNT.Value), 0, modGeneral.TypeOfValue.Nothing));
                num4 = num3;
                if (num3 != 0.0)
                {
                    int num;
                    switch (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboPhanBo.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim())
                    {
                        case "TG":
                            pTongSo = LVYModule.SumColGrid(this.VSlist, 15);
                            if (pTongSo != 0.0)
                            {
                                int num8 = this.VSlist.Rows.Count - 1;
                                for (num = 1; num <= num8; num++)
                                {
                                    if (num < (this.VSlist.Rows.Count - 1))
                                    {
                                        num7 = this.PhanTram(pTongSo, Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[num, 15]), 0, modGeneral.TypeOfValue.Nothing)));
                                        num2 = (num3 * num7) / 100.0;
                                        this.VSlist[num, 0x10] = Math.Round(num2, 0);
                                        num4 -= num2;
                                    }
                                    else
                                    {
                                        this.VSlist[num, 0x10] = num4;
                                    }
                                    this.VSlist[num, 0x11] = RuntimeHelpers.GetObjectValue(this.TxtThueSuat.Value);
                                    this.VSlist[num, 0x12] = Math.Round((double) ((Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[num, 0x10]), 0, modGeneral.TypeOfValue.Nothing)) * Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[num, 0x11]), 0, modGeneral.TypeOfValue.Nothing))) / 100.0), 0);
                                }
                            }
                            break;

                        case "SL":
                            num5 = LVYModule.SumColGrid(this.VSlist, 13);
                            if (num5 != 0.0)
                            {
                                int num9 = this.VSlist.Rows.Count - 1;
                                for (num = 1; num <= num9; num++)
                                {
                                    if (num < (this.VSlist.Rows.Count - 1))
                                    {
                                        num7 = this.PhanTram(num5, Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[num, 13]), 0, modGeneral.TypeOfValue.Nothing)));
                                        num2 = (num3 * num7) / 100.0;
                                        this.VSlist[num, 0x10] = Math.Round(num2, 0);
                                        num4 -= num2;
                                    }
                                    else
                                    {
                                        this.VSlist[num, 0x10] = num4;
                                    }
                                    this.VSlist[num, 0x11] = RuntimeHelpers.GetObjectValue(this.TxtThueSuat.Value);
                                    this.VSlist[num, 0x12] = Math.Round((double) ((Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[num, 0x10]), 0, modGeneral.TypeOfValue.Nothing)) * Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[num, 0x11]), 0, modGeneral.TypeOfValue.Nothing))) / 100.0), 0);
                                }
                            }
                            break;
                    }
                }
            }
        }

        public int PhanTram(double pTongSo, double pSo)
        {
            return (int) Math.Round((double) ((pSo * 100.0) / pTongSo));
        }

        public bool SaveDetails()
        {
            C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                this.objCPCT.Khoa = Conversions.ToString(vSlist[i, 0]);
                this.objCPCT.KhoaChungTuChiPhi = this.cFrmKhoa;
                this.objCPCT.KhoaPhieuNhap = this.cFrmKhoaPhieuNhap;
                this.objCPCT.KhoaKho = Conversions.ToString(vSlist[i, 1]);
                this.objCPCT.KhoaHangHoa = Conversions.ToString(vSlist[i, 3]);
                this.objCPCT.KhoaDonViTinh = Conversions.ToString(vSlist[i, 10]);
                this.objCPCT.QuyCach = Conversions.ToDouble(vSlist[i, 12]);
                this.objCPCT.NgayNhap = Conversions.ToString(vSlist[i, 8]);
                this.objCPCT.SoSeri = Conversions.ToString(vSlist[i, 7]);
                this.objCPCT.SoLoHang = Conversions.ToString(vSlist[i, 6]);
                this.objCPCT.HanSuDung = Conversions.ToString(vSlist[i, 9]);
                this.objCPCT.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
                this.objCPCT.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                this.objCPCT.SoLuong = Conversions.ToDouble(vSlist[i, 13]);
                this.objCPCT.DonGia = Conversions.ToDouble(vSlist[i, 14]);
                this.objCPCT.ThanhTien = Conversions.ToDouble(vSlist[i, 15]);
                this.objCPCT.TienPhiNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x10]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCPCT.TienPhi = this.objCPCT.TienPhiNT * this.objCPCT.TyGia;
                this.objCPCT.ThueSuat = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x11]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCPCT.TienThueNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(vSlist[i, 0x12]), 0, modGeneral.TypeOfValue.Nothing));
                this.objCPCT.TienThue = this.objCPCT.TienThueNT * this.objCPCT.TyGia;
                this.objCPCT.KhoaTKHangHoa = Conversions.ToString(vSlist[i, 0x13]);
                if (!this.objCPCT.Save())
                {
                    return false;
                }
            }
            vSlist = null;
            return true;
        }

        public void ShowData(string strKhoa)
        {
            this.objCP.Load(strKhoa);
            this.cFrmKhoaPhieuNhap = this.objCP.KhoaPhieuNhap;
            this.cFrmKhoa = strKhoa;
            this.TxtSoChungTu.Text = this.objCP.SoChungTuNhap;
            this.TxtNgayChungTu.Text = LVYModule.Char2Date(this.objCP.NgayChungTuNhap);
            this.TxtSoCT.Text = this.objCP.SoChungTu;
            this.TxtNgayCT.Text = LVYModule.Char2Date(this.objCP.NgayChungTu);
            this.CboLoaiChiPhi.SelectedValue = this.objCP.KhoaLoaiPhi;
            this.AdvNhaCungCap.Value = this.objCP.KhoaDoiTuong;
            this.txtMST.Text = this.objCP.MaSoThue;
            this.AdvTKThanhToan.Value = this.objCP.KhoaTKChu;
            this.AdvTKThue.Value = this.objCP.KhoaTKThue;
            this.CboLoaiTien.SelectedValue = this.objCP.LoaiTien;
            this.TxtTyGia.Value = this.objCP.TyGia;
            this.CboLoaiHoaDon.SelectedValue = this.objCP.KhoaLoaiHoaDon;
            this.TxtSoHoaDon.Text = this.objCP.SoHoaDon;
            this.TxtNgayHoaDon.Text = LVYModule.Char2Date(this.objCP.NgayHoaDon);
            this.TxtSoSeri.Text = this.objCP.Soseri;
            this.TxtThueSuat.Value = this.objCP.ThueSuat;
            this.TxtTienPhiNT.Value = this.objCP.TienPhiNT;
            this.TxtTienPhi.Value = this.objCP.TienPhi;
            this.TxtTienThuePhiNT.Value = this.objCP.TienThueNT;
            this.TxtTienThuePhi.Value = this.objCP.TienThue;
            this.CboPhanBo.SelectedValue = this.objCP.LoaiPhanBo;
            this.TxtDienGiaiPhi.Text = this.objCP.DienGiai;
            this.VSlist.Rows.Count = 1;
            this.CboLoaiDuLieu.SelectedValue = this.objCP.DuLieu;
            this.CboKhaiThue.SelectedValue = this.objCP.KhoaHangMucBaoCaoThue;
            DataTable details = this.objCP.GetDetails(this.cFrmKhoa);
            if (details != null)
            {
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                int num2 = details.Rows.Count - 1;
                for (int i = 0; i <= num2; i++)
                {
                    vSlist.AddItem("");
                    vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(details.Rows[i]["Khoa"]);
                    vSlist[vSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaKho"]);
                    vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoHang"]);
                    vSlist[vSlist.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaHangHoa"]);
                    vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(details.Rows[i]["Ma"]);
                    vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(details.Rows[i]["HangHoa"]);
                    vSlist[vSlist.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoLoHang"]);
                    vSlist[vSlist.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoSeri"]);
                    vSlist[vSlist.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(details.Rows[i]["NgayNhap"]);
                    vSlist[vSlist.Rows.Count - 1, 9] = LVYModule.Char2Date(Conversions.ToString(details.Rows[i]["HanSuDung"]));
                    vSlist[vSlist.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaDonViTinh"]);
                    vSlist[vSlist.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(details.Rows[i]["DonViTinh"]);
                    vSlist[vSlist.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(details.Rows[i]["QuyCach"]);
                    vSlist[vSlist.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoLuong"]);
                    vSlist[vSlist.Rows.Count - 1, 14] = RuntimeHelpers.GetObjectValue(details.Rows[i]["DonGia"]);
                    vSlist[vSlist.Rows.Count - 1, 15] = RuntimeHelpers.GetObjectValue(details.Rows[i]["ThanhTien"]);
                    vSlist[vSlist.Rows.Count - 1, 0x10] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TienPhiNT"]);
                    vSlist[vSlist.Rows.Count - 1, 0x11] = RuntimeHelpers.GetObjectValue(details.Rows[i]["ThueSuat"]);
                    vSlist[vSlist.Rows.Count - 1, 0x12] = RuntimeHelpers.GetObjectValue(details.Rows[i]["TienThueNT"]);
                    vSlist[vSlist.Rows.Count - 1, 0x13] = RuntimeHelpers.GetObjectValue(details.Rows[i]["KhoaTKHangHoa"]);
                    vSlist[vSlist.Rows.Count - 1, 20] = RuntimeHelpers.GetObjectValue(details.Rows[i]["SoTaiKhoan"]);
                }
                vSlist = null;
            }
        }

        public void ShowDataPhieuNhap(string strKhoa)
        {
            if (this.objNK.Load(strKhoa))
            {
                this.TxtSoChungTu.Text = this.objNK.SoChungTu;
                this.TxtNgayChungTu.Text = LVYModule.Char2Date(this.objNK.NgayChungTu);
                this.VSlist.Rows.Count = 1;
                DataTable listDetails = this.objNK.GetListDetails(strKhoa);
                if (listDetails != null)
                {
                    int num2 = listDetails.Rows.Count - 1;
                    for (int i = 0; i <= num2; i++)
                    {
                        C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                        vSlist.AddItem("");
                        vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Khoa"]);
                        vSlist[vSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaKho"]);
                        vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoHang"]);
                        vSlist[vSlist.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaHangHoa"]);
                        vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Ma"]);
                        vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["HangHoa"]);
                        vSlist[vSlist.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoLoHang"]);
                        vSlist[vSlist.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoSeri"]);
                        vSlist[vSlist.Rows.Count - 1, 8] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["NgayNhap"]);
                        vSlist[vSlist.Rows.Count - 1, 9] = LVYModule.Char2Date(Conversions.ToString(listDetails.Rows[i]["NgayHetHanDung"]));
                        vSlist[vSlist.Rows.Count - 1, 10] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaDonViTinh"]);
                        vSlist[vSlist.Rows.Count - 1, 11] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonViTinh"]);
                        vSlist[vSlist.Rows.Count - 1, 12] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["HeSo"]);
                        vSlist[vSlist.Rows.Count - 1, 13] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoLuong"]);
                        vSlist[vSlist.Rows.Count - 1, 14] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonGia"]);
                        vSlist[vSlist.Rows.Count - 1, 15] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["TienHang"]);
                        vSlist[vSlist.Rows.Count - 1, 0x13] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["KhoaTKHangHoa"]);
                        vSlist[vSlist.Rows.Count - 1, 20] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoTaiKhoan"]);
                        vSlist = null;
                    }
                }
            }
        }

        public void TinhChietKhau(int nRow)
        {
            double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 15]), 0, modGeneral.TypeOfValue.Nothing));
            int num2 = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 0x10]), 0, modGeneral.TypeOfValue.Nothing));
            this.VSlist[nRow, 0x11] = Math.Round((double) ((num * num2) / 100.0), 0);
        }

        public void TinhThue()
        {
            double num3 = 0.0;
            double num2 = 0.0;
            int num4 = 0;
            int num5 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num5; i++)
            {
                num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 15]), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x12]), 0, modGeneral.TypeOfValue.Nothing));
                num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x11]), 0, modGeneral.TypeOfValue.Nothing));
                num4 = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0x13]), 0, modGeneral.TypeOfValue.Nothing));
                this.VSlist[i, 20] = Math.Round((double) (((num3 - num2) * num4) / 100.0), 0);
            }
        }

        public void TinhTienHang(int nRow)
        {
            double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 13]), 0, modGeneral.TypeOfValue.Nothing));
            double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 14]), 0, modGeneral.TypeOfValue.Nothing));
            this.VSlist[nRow, 15] = num2 * num;
        }

        private void TxtTienPhiNKNT_LostFocus(object sender, EventArgs e)
        {
            double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienPhiNT.Value), 0, modGeneral.TypeOfValue.Nothing));
            int num3 = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtThueSuat.Value), 0, modGeneral.TypeOfValue.Nothing));
            this.TxtTienPhi.Value = num * num2;
            this.TxtTienThuePhiNT.Value = Math.Round((double) ((num * num3) / 100.0), 0);
            this.TxtTienThuePhi.Value = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienThuePhiNT.Value), 0, modGeneral.TypeOfValue.Nothing)) * num2;
            this.PhanBoChiPhi();
        }

        public bool UpDateData()
        {
            bool flag=false;
            clsChiPhiMuaHang objCP = this.objCP;
            objCP.Khoa = this.cFrmKhoa;
            objCP.KhoaPhieuNhap = this.cFrmKhoaPhieuNhap;
            objCP.KhoaTKChu = this.AdvTKThanhToan.Value;
            objCP.KhoaTKThue = this.AdvTKThue.Value;
            objCP.SoChungTuNhap = this.TxtSoChungTu.Text;
            objCP.NgayChungTuNhap = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
            objCP.SoChungTu = this.TxtSoCT.Text;
            objCP.NgayChungTu = LVYModule.Date2Char(this.TxtNgayCT.Text);
            objCP.KhoaLoaiPhi = Conversions.ToString(this.CboLoaiChiPhi.SelectedValue);
            objCP.KhoaDoiTuong = this.AdvNhaCungCap.Value;
            objCP.MaSoThue = this.txtMST.Text;
            objCP.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
            objCP.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            objCP.KhoaLoaiHoaDon = Conversions.ToString(this.CboLoaiHoaDon.SelectedValue);
            objCP.SoHoaDon = this.TxtSoHoaDon.Text.Trim();
            objCP.NgayHoaDon = LVYModule.Date2Char(this.TxtNgayHoaDon.Text);
            objCP.Soseri = this.TxtSoSeri.Text;
            objCP.ThueSuat = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtThueSuat.Value), 0, modGeneral.TypeOfValue.Nothing));
            objCP.TienPhiNT = Conversions.ToDouble(this.TxtTienPhiNT.Value);
            objCP.TienPhi = Conversions.ToDouble(this.TxtTienPhi.Value);
            objCP.TienThueNT = Conversions.ToDouble(this.TxtTienThuePhiNT.Value);
            objCP.TienThue = Conversions.ToDouble(this.TxtTienThuePhi.Value);
            objCP.LoaiPhanBo = Conversions.ToString(this.CboPhanBo.SelectedValue);
            objCP.DienGiai = this.TxtDienGiaiPhi.Text;
            objCP.KhoaDonVi = modGeneral.H_CLIENT;
            if (objCP.KhoaNhanVienTao.Trim() == "")
            {
                objCP.KhoaNhanVienTao = modGeneral.H_USERID;
                objCP.NgayTao = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            }
            objCP.KhoaNhanVienSua = modGeneral.H_USERID;
            objCP.NgaySua = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            objCP.Send = 0;
            objCP.DuLieu = Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiDuLieu.SelectedValue), "", modGeneral.TypeOfValue.Nothing));
            objCP.KhoaHangMucBaoCaoThue = Conversions.ToString(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhaiThue.SelectedValue), "", modGeneral.TypeOfValue.Nothing));
            return objCP.Save();
            objCP = null;
            return flag;
        }

        private void VSlist_AfterEdit(object sender, RowColEventArgs e)
        {
            switch (e.Col)
            {
                case 13:
                    this.TinhTienHang(e.Row);
                    this.TinhChietKhau(e.Row);
                    this.TinhThue();
                    break;

                case 14:
                    this.TinhTienHang(e.Row);
                    this.TinhChietKhau(e.Row);
                    this.TinhThue();
                    break;

                case 0x10:
                    this.TinhChietKhau(e.Row);
                    this.TinhThue();
                    break;

                case 0x13:
                    this.TinhThue();
                    break;
            }
        }

        private void VSlist_BeforeEdit(object sender, RowColEventArgs e)
        {
            if (!this.mEnabledControl)
            {
                e.Cancel = true;
            }
            else if ((e.Col < 15) | (e.Col > 0x12))
            {
                e.Cancel = true;
            }
            else if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectNotEqual(this.CboPhanBo.SelectedValue, "PB", false))
            {
                e.Cancel = true;
            }
        }

        internal virtual ADVAccount AdvAccount1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvAccount1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvAccount1 = value;
            }
        }

        internal virtual ADVAccount AdvAccount2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvAccount2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvAccount2 = value;
            }
        }

        internal virtual ADVObjects AdvNhaCungCap
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvNhaCungCap;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                ADVObjects.ValueChangedEventHandler handler = new ADVObjects.ValueChangedEventHandler(this.AdvNhaCungCap_ValueChanged);
                if (this._AdvNhaCungCap != null)
                {
                    this._AdvNhaCungCap.ValueChanged -= handler;
                }
                this._AdvNhaCungCap = value;
                if (this._AdvNhaCungCap != null)
                {
                    this._AdvNhaCungCap.ValueChanged += handler;
                }
            }
        }

        internal virtual ADVObjects AdvObjects1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvObjects1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvObjects1 = value;
            }
        }

        internal virtual ADVAccount AdvTKThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKThanhToan = value;
            }
        }

        internal virtual ADVAccount AdvTKThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKThue = value;
            }
        }

        internal virtual Button Button1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Button1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Button1 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual C1NumericEdit C1NumericEdit1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1NumericEdit1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1NumericEdit1 = value;
            }
        }

        internal virtual C1NumericEdit C1NumericEdit2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1NumericEdit2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1NumericEdit2 = value;
            }
        }

        internal virtual C1NumericEdit C1NumericEdit3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1NumericEdit3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1NumericEdit3 = value;
            }
        }

        internal virtual C1NumericEdit C1NumericEdit4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1NumericEdit4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1NumericEdit4 = value;
            }
        }

        internal virtual C1NumericEdit C1NumericEdit5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1NumericEdit5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1NumericEdit5 = value;
            }
        }

        internal virtual C1NumericEdit C1NumericEdit6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1NumericEdit6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1NumericEdit6 = value;
            }
        }

        internal virtual ComboBox CboKhaiThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKhaiThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboKhaiThue = value;
            }
        }

        internal virtual ComboBox CboLoaiChiPhi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiChiPhi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiChiPhi = value;
            }
        }

        internal virtual ComboBox CboLoaiDuLieu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiDuLieu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiDuLieu = value;
            }
        }

        internal virtual ComboBox CboLoaiHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiHoaDon_SelectedIndexChanged);
                if (this._CboLoaiHoaDon != null)
                {
                    this._CboLoaiHoaDon.SelectedIndexChanged -= handler;
                }
                this._CboLoaiHoaDon = value;
                if (this._CboLoaiHoaDon != null)
                {
                    this._CboLoaiHoaDon.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboNguyenTePhiNK_SelectedIndexChanged);
                EventHandler handler2 = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                    this._CboLoaiTien.SelectedIndexChanged -= handler2;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                    this._CboLoaiTien.SelectedIndexChanged += handler2;
                }
            }
        }

        internal virtual ComboBox CboPhanBo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboPhanBo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboPhanBo_SelectedIndexChanged);
                if (this._CboPhanBo != null)
                {
                    this._CboPhanBo.SelectedIndexChanged -= handler;
                }
                this._CboPhanBo = value;
                if (this._CboPhanBo != null)
                {
                    this._CboPhanBo.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual Button CmdChuyen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdChuyen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdChuyen = value;
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDel_Click);
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click -= handler;
                }
                this._CmdDel = value;
                if (this._CmdDel != null)
                {
                    this._CmdDel.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdFind_Click);
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click -= handler;
                }
                this._CmdFind = value;
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdPrint = value;
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual Button CmdSearchHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSearchHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSearchHangHoa_Click);
                if (this._CmdSearchHangHoa != null)
                {
                    this._CmdSearchHangHoa.Click -= handler;
                }
                this._CmdSearchHangHoa = value;
                if (this._CmdSearchHangHoa != null)
                {
                    this._CmdSearchHangHoa.Click += handler;
                }
            }
        }

        internal virtual ToolStripMenuItem CmdTimNhapKhau
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdTimNhapKhau;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdTimNhapKhau_Click);
                if (this._CmdTimNhapKhau != null)
                {
                    this._CmdTimNhapKhau.Click -= handler;
                }
                this._CmdTimNhapKhau = value;
                if (this._CmdTimNhapKhau != null)
                {
                    this._CmdTimNhapKhau.Click += handler;
                }
            }
        }

        internal virtual ToolStripMenuItem CmdTimNhapKho
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdTimNhapKho;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdTimNhapKho_Click);
                if (this._CmdTimNhapKho != null)
                {
                    this._CmdTimNhapKho.Click -= handler;
                }
                this._CmdTimNhapKho = value;
                if (this._CmdTimNhapKho != null)
                {
                    this._CmdTimNhapKho.Click += handler;
                }
            }
        }

        internal virtual ContextMenuStrip CmdTimPhieuNhap
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdTimPhieuNhap;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdTimPhieuNhap = value;
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        internal virtual ComboBox ComboBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ComboBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ComboBox1 = value;
            }
        }

        internal virtual ComboBox ComboBox2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ComboBox2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ComboBox2 = value;
            }
        }

        internal virtual ComboBox ComboBox3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ComboBox3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ComboBox3 = value;
            }
        }

        internal virtual ComboBox ComboBox4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ComboBox4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ComboBox4 = value;
            }
        }

        internal virtual DateTimePicker DateTimePicker1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._DateTimePicker1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._DateTimePicker1 = value;
            }
        }

        internal virtual DateTimePicker DateTimePicker2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._DateTimePicker2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._DateTimePicker2 = value;
            }
        }

        public bool EnabledControl
        {
            get
            {
                return this.mEnabledControl;
            }
            set
            {
                this.mEnabledControl = value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.CmdFind.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CmdPrint.Enabled = !value;
                this.AdvNhaCungCap.ReadOnly = !value;
                this.AdvTKThanhToan.ReadOnly = !value;
                this.AdvTKThue.ReadOnly = !value;
                this.TxtSoHoaDon.ReadOnly = !value;
                this.TxtNgayHoaDon.Enabled = value;
                this.CboLoaiHoaDon.Enabled = value;
                this.CboPhanBo.Enabled = value;
                this.CboLoaiTien.Enabled = value;
                this.TxtTyGia.ReadOnly = !value;
                this.TxtDienGiaiPhi.ReadOnly = !value;
                this.TxtTienPhiNT.ReadOnly = !value;
                this.TxtSoSeri.ReadOnly = !value;
                this.TxtThueSuat.ReadOnly = !value;
                this.TxtSoCT.ReadOnly = !value;
                this.CboLoaiChiPhi.Enabled = value;
                this.CboLoaiDuLieu.Enabled = value;
                this.CmdChuyen.Enabled = !value;
                this.txtMST.ReadOnly = !value;
                this.CboKhaiThue.Enabled = value;
                this.txtMST.ReadOnly = !value;
            }
        }

        internal virtual ImageList ImageList1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ImageList1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ImageList1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label12
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label12;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label12 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label14
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label14;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label14 = value;
            }
        }

        internal virtual Label Label15
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label15;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label15 = value;
            }
        }

        internal virtual Label Label16
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label16;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label16 = value;
            }
        }

        internal virtual Label Label17
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label17;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label17 = value;
            }
        }

        internal virtual Label Label18
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label18;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label18 = value;
            }
        }

        internal virtual Label Label19
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label19;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label19 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label20
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label20;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label20 = value;
            }
        }

        internal virtual Label Label21
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label21;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label21 = value;
            }
        }

        internal virtual Label Label22
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label22;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label22 = value;
            }
        }

        internal virtual Label Label23
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label23;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label23 = value;
            }
        }

        internal virtual Label Label24
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label24;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label24 = value;
            }
        }

        internal virtual Label Label25
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label25;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label25 = value;
            }
        }

        internal virtual Label Label26
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label26;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label26 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label42
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label42;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label42 = value;
            }
        }

        internal virtual Label Label47
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label47;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label47 = value;
            }
        }

        internal virtual Label Label48
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label48;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label48 = value;
            }
        }

        internal virtual Label Label49
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label49;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label49 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label50
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label50;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label50 = value;
            }
        }

        internal virtual Label Label51
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label51;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label51 = value;
            }
        }

        internal virtual Label Label52
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label52;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label52 = value;
            }
        }

        internal virtual Label Label53
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label53;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label53 = value;
            }
        }

        internal virtual Label Label54
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label54;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label54 = value;
            }
        }

        internal virtual Label Label55
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label55;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label55 = value;
            }
        }

        internal virtual Label Label56
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label56;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label56 = value;
            }
        }

        internal virtual Label Label57
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label57;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label57 = value;
            }
        }

        internal virtual Label Label59
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label59;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label59 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label60
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label60;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label60 = value;
            }
        }

        internal virtual Label Label63
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label63;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label63 = value;
            }
        }

        internal virtual Label Label64
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label64;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label64 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual Panel PNDungChung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._PNDungChung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._PNDungChung = value;
            }
        }

        internal virtual TextBox TextBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TextBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TextBox1 = value;
            }
        }

        internal virtual TextBox TextBox2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TextBox2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TextBox2 = value;
            }
        }

        internal virtual TextBox TextBox3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TextBox3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TextBox3 = value;
            }
        }

        internal virtual TextBox TextBox4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TextBox4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TextBox4 = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripButton ToolStripButton2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual TextBox TxtDienGiaiPhi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienGiaiPhi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDienGiaiPhi = value;
            }
        }

        internal virtual TextBox txtMST
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtMST;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtMST = value;
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayChungTu = value;
            }
        }

        internal virtual DateTimePicker TxtNgayCT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayCT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayCT = value;
            }
        }

        internal virtual DateTimePicker TxtNgayHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayHoaDon = value;
            }
        }

        internal virtual TextBox TxtSoChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoChungTu = value;
            }
        }

        internal virtual TextBox TxtSoCT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoCT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoCT = value;
            }
        }

        internal virtual TextBox TxtSoHoaDon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoHoaDon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoHoaDon = value;
            }
        }

        internal virtual TextBox TxtSoSeri
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoSeri;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoSeri = value;
            }
        }

        internal virtual C1NumericEdit TxtThueSuat
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtThueSuat;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtThueSuat = value;
            }
        }

        internal virtual C1NumericEdit TxtTienPhi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienPhi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienPhi = value;
            }
        }

        internal virtual C1NumericEdit TxtTienPhiNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienPhiNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtTienPhiNKNT_LostFocus);
                if (this._TxtTienPhiNT != null)
                {
                    this._TxtTienPhiNT.LostFocus -= handler;
                }
                this._TxtTienPhiNT = value;
                if (this._TxtTienPhiNT != null)
                {
                    this._TxtTienPhiNT.LostFocus += handler;
                }
            }
        }

        internal virtual C1NumericEdit TxtTienThuePhi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienThuePhi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienThuePhi = value;
            }
        }

        internal virtual C1NumericEdit TxtTienThuePhiNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienThuePhiNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienThuePhiNT = value;
            }
        }

        internal virtual C1NumericEdit TxtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTyGia = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSlist_BeforeEdit);
                RowColEventHandler handler2 = new RowColEventHandler(this.VSlist_AfterEdit);
                if (this._VSlist != null)
                {
                    this._VSlist.BeforeEdit -= handler;
                    this._VSlist.AfterEdit -= handler2;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.BeforeEdit += handler;
                    this._VSlist.AfterEdit += handler2;
                }
            }
        }
    }
}

